# $Id$
# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=perl-mailtools
pkgver=2.20
pkgrel=2
pkgdesc="Various e-mail related modules"
arch=('any')
url="https://metacpan.org/release/MailTools"
license=('PerlArtistic' 'GPL')
depends=('perl-timedate')
options=('!emptydirs')
source=("http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/MailTools-$pkgver.tar.gz")
sha512sums=('fb9a330c5b5795d68fc0e5bb6c5f1d7d525e8e1e87996f6fac7120e46bc22897c9f0c23f121866cb10d7ce4ffd9ac979b31602dbec379a8d15e8257a2c725a5e')

build() {
  cd MailTools-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd MailTools-$pkgver
  make test
}

package() {
  cd MailTools-$pkgver
  make DESTDIR="$pkgdir" install
}
